package cn.forge.mall.system.api.oauth2;

import cn.forge.mall.framework.common.pojo.CommonResult;
import cn.forge.mall.system.api.oauth2.dto.OAuth2AccessTokenCheckRespDTO;
import cn.forge.mall.system.enums.ApiConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author liangyuanping
 * @ClassName OAuth2TokenApi
 * @description:
 * @date 2024年03月21日
 * @version: 1.0
 */
@FeignClient(name = ApiConstants.NAME)
public interface OAuth2TokenApi {

    String PREFIX = ApiConstants.PREFIX + "/oauth2/token";

    String URL_CHECK = "http://" + ApiConstants.NAME + PREFIX + "/check";

    @GetMapping(PREFIX + "/check")
    CommonResult<OAuth2AccessTokenCheckRespDTO> checkAccessToken(@RequestParam("accessToken") String accessToken);

    @GetMapping(PREFIX + "/demo/rpc")
    CommonResult<OAuth2AccessTokenCheckRespDTO> testRpc(@RequestParam("test") String test);
}
